package com.ease.component.interfaces {
    import mx.core.IContainer;

    /**
     * The interface specified the lifec cycle methods of a wizard panel.
     * The wizard uses these methods to communicate with the panel.
     *
     * All Wizard Panel has to implement the interface.
     *
     * All WizardPanel has to be an instance of mx.core.Container.
     *
     */

    public interface IWizardPanel {
        function set panelId(arg:String):void;
        function get panelId():String;

        /* panel life cycle methods */

        /**
         * Called by Wizard everytime a panel is on display. The panel
         * loading may be caused by a user click on next/back button.
         *
         * When panel is visited first time, onLoad is called between initilization and
         * creationComplete events of the panel. However, it is not
         * recommended to depend on this order.
         *
         * @param callback
         *
         */
        function onLoad(callback:IWizard):void;

        /**
         * Called by Wizard when the wizard NEXT button is clicked.
         *
         * @param callback
         *
         */
        function onNext(callback:IWizard):void;

        /**
         * Called by Wizard when the wizard BACK button is clicked.
         *
         * @param callback
         *
         */
        function onBack(callback:IWizard):void;

        /**
         * Called by Wizard when the wizard FINISH button is clicked.
         *
         * @param callback
         *
         */
        function onFinish(callback:IWizard):void;

        /**
         * Called by Wizard when the wizard path is changed.
         *
         * @param callback
         *
         */
        function onPathChange(callback:IWizard):void;
    }
}
